package top.tangyh.lamp.care.vo.result;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import top.tangyh.lamp.care.entity.BTimePlan;
import top.tangyh.lamp.common.utils.PDateUtils;

@Data
@Schema(description ="时间点")
public class TimePointOutVO {

    @Schema(description = "自定义时间点id", required = false)
    private Long id;

    @Schema(description = "时间点时间戳", required = true)
    private Long timePoint;

    public TimePointOutVO(BTimePlan timePlan) {
        this.id = timePlan.getId();
        this.timePoint = PDateUtils.getTimestampOfDateTime(timePlan.getTimePoint()) ;
    }

    public TimePointOutVO() {
    }

    public TimePointOutVO(Long timePoint) {
        this.timePoint = timePoint;
    }

}
